/**
 * Copyright (c) 2014 zhenrongbao.com, Inc. All Rights Reserved
 * @author: jiangshuguang
 * @Date  : 14-12-1
 * @Time  : 下午4:46
 * @brief :
 */

var Dialog = require('common:widget/ui/dialog/dialog.js').Dialog,
    dialog = new Dialog();

exports.check = {
    'amount':function(amount){
        if(parseInt(amount)<=0 || !/^\d+$/.test(amount)){
            dialog.show("购买金额必须为大于0的整数");
            return false;
        }
        return true;
    }
};